1. Field of the Invention
The present invention relates to a control apparatus that receives instruction data from a transmission unit and controls a controlled apparatus based on the instruction data.
2. Description of the Related Art
Image forming apparatuses such as a copying machine and a multifunction peripheral perform serial communications between their built-in central processing units (CPUs) and dedicated semiconductor devices for performing drive control of various motors. Hereinafter, dedicated semiconductor devices will be referred to as application specific integrated circuits (ASICs). Serial communications transfer addresses and data through the same communication line in a time-division manner. Serial communications can thus reduce the wiring area as compared to parallel communications which use a plurality of communication lines. Serial communications, however, need an increased communication frequency to achieve a transfer rate equivalent to or higher than that of parallel communications.
If the communication frequency is increased to increase communication speed, communication errors occur more easily due to noise getting into the communication line(s). Various techniques have heretofore been discussed to avoid such communication errors. Examples include the inventions discussed in Japanese Patent Application Laid-Open No. 2000-41057, Japanese Patent Application Laid-Open No. 2007-148592, Japanese Patent Application Laid-Open No. 2006-191188, and Japanese Patent Application Laid-Open No. 2007-317263.
Japanese Patent Application Laid-Open No. 2000-41057 discusses a serial communication system that transfers the same communication data twice in one communication. The first communication data and the second communication data are compared, and if the comparison result indicates a mismatch, a communication error is determined to have occurred. An internal access of the data occurs only if the comparison result indicates a match. Since one serial communication transfers the same data twice, the effective value of the communication rate is reduced by half.
Japanese Patent Application Laid-Open No. 2007-148592 discusses a data communication apparatus that performs a communication between a CPU and a device by using an inter-integrated circuit (I2C) bus. Transfer data transferred from the CPU to the device includes a clock signal and a data signal, which are fed back to the CPU. The CPU monitors any difference between the transfer data and the feedback data and thereby determines the occurrence of a communication error. When a communication error occurs, the CPU retransmits the transfer data.
Japanese Patent Application Laid-Open No. 2006-191188 discusses an image transfer apparatus that transfers pixel data by serial communication. The pixel data is serial data to which error detection data is added line by line. The image transfer apparatus detects the presence or absence of an error in the pixel data by using the error detection data. The image transfer apparatus temporarily stores the pixel data line by line regardless of the present or absence of an error, and if the pixel data is determined to be erroneous, the image transfer apparatus will not write the pixel data into a frame memory.
Japanese Patent Application Laid-Open No. 2007-317263 discusses a method for recovering data by adjusting a data transfer clock and making a retry if a transfer error of serial data occurs.
Image forming apparatuses require stable, high productivity. An image forming apparatus may include driving parts such as a motor, and sensors for monitoring various parts. To control such driving parts and sensors by serial communication, a communication baud rate as high as several M bps is needed when calculated from the number of register accesses needed per unit time. The necessary communication baud rate is even higher if possibilities of retransmissions (retries) in the event of an error are taken into account. In a method for performing communication by using communication packets including cyclic redundancy check (CRC), it is relatively easy to monitor communication errors. With such communication packets, the processing for retransmitting data in the event of an error due to line noise can be performed in a short time. This can maintain high productivity required of an image forming apparatus.
The foregoing Japanese Patent Application Laid-Open No. 2000-41057, Japanese Patent Application Laid-Open No. 2007-148592, Japanese Patent Application Laid-Open No. 2006-191188, and 2007-317263 each discuss a method for avoiding a communication error that occurs when transferring data from a side for transmitting control data needed for control (hereinafter, referred to as a “main station”) to a side for receiving the control data (hereinafter, referred to as a “slave station”). If a communication from the main station to the slave station has succeeded but noise gets into reply data from the slave station to the main station, the main station determines that the slave station is undergoing a communication error, and retransmits the data.
In such a case, the slave station recognizes that the communication has normally been made once. An internal access occurred at that point. When the main station retransmits the data, the same access is repeated. The repetition matters little if such an access is made to a simple register where two consecutive write or read operations will not cause a state transition of a control target. On the other hand, if the access is a start trigger of an operation, two consecutive accesses can restart the operation that has once been started. An intended operation can also fail in the case of first-in, first-out (FIFO) where an access entails a state transition.